package cn.test.pojo.domain;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.util.Date;

/**
 * @Description 股票涨跌信息
 */
@ApiModel(description = "股票涨跌信息")
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class StockUpdownDomain {

    /**
     * 股票代码
     */
    @ApiModelProperty(value = "股票代码", required = true)
    @ExcelProperty(value = {"股票信息", "股票代码"}, index = 0)
    private String code;

    /**
     * 股票名称
     */
    @ApiModelProperty(value = "股票名称", required = true)
    @ExcelProperty(value = {"股票信息", "股票名称"}, index = 1)
    private String name;

    /**
     * 前收盘价
     */
    @ApiModelProperty(value = "前收盘价", required = true)
    @ExcelProperty(value = {"股票信息", "前收盘价"}, index = 2)
    private BigDecimal preClosePrice;

    /**
     * 当前价格
     */
    @ApiModelProperty(value = "当前价格", required = true)
    @ExcelProperty(value = {"股票信息", "当前价格"}, index = 3)
    private BigDecimal tradePrice;

    /**
     * 涨跌
     */
    @ApiModelProperty(value = "涨跌", required = true)
    @ExcelProperty(value = {"股票信息", "涨跌"}, index = 4)
    private BigDecimal increase;

    /**
     * 涨幅
     */
    @ApiModelProperty(value = "涨幅", required = true)
    @ExcelProperty(value = {"股票信息", "涨幅"}, index = 5)
    private BigDecimal upDown;

    /**
     * 振幅
     */
    @ApiModelProperty(value = "振幅", required = true)
    @ExcelProperty(value = {"股票信息", "振幅"}, index = 6)
    private BigDecimal amplitude;

    /**
     * 交易量
     */
    @ApiModelProperty(value = "交易量", required = true)
    @ExcelProperty(value = {"股票信息", "交易量"}, index = 7)
    private Long tradeAmt;

    /**
     * 交易金额
     */
    @ApiModelProperty(value = "交易金额", required = true)
    @ExcelProperty(value = {"股票信息", "交易金额"}, index = 8)
    private BigDecimal tradeVol;

    /**
     * 当前日期
     */
    @ApiModelProperty(value = "当前日期", required = true)
    @ExcelProperty(value = {"股票信息", "当前日期"}, index = 9)
    @DateTimeFormat("yyy-MM-dd HH:mm")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    private Date curDate;
}